﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using DataAnnotationsExtensions;
using System.ComponentModel.DataAnnotations.Schema;

namespace Qu.ComputingContest.Model
{
    [MetadataType(typeof(SchoolMetadata))]
    public partial class School
    {
        //[NotMapped]
        //public int Teams { set; get; }
    }

    public class SchoolMetadata
    {
        [Email]
        [DisplayName("School Email")]
        [MaxLength(50, ErrorMessage = "50 Characters maximum")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        [Required]
        [DisplayName("School Phone Number")]
        [MinLength(8, ErrorMessage = "The phone number must be 8 digits minimum")]
        [MaxLength(10, ErrorMessage = "The phone number can be 10 digits maximum")]
        public string Phone1 { get; set; }

        [DisplayName("Second Phone Number")]
        [MinLength(8, ErrorMessage = "The phone number must be 8 digits minimum")]
        [MaxLength(10, ErrorMessage = "The phone number can be 10 digits maximum")]
        public string Phone2 { get; set; }

        [MinLength(8, ErrorMessage = "The fax number must be 8 digits minimum")]
        [MaxLength(10, ErrorMessage = "The fax number can be 10 digits maximum")]
        public string Fax { get; set; }


        [MaxLength(100, ErrorMessage = "100 Characters maximum")]
        [DataType(DataType.Url)]
        //[Url]
        [DisplayName("School Website")]
        public string Website { get; set; }

    }
}